from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^djambe/', include('djambe.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    url(r'^logout_view/$', 'djambe.wiki.views.logout_view', name='logout'),
    url(r'^$', 'djambe.wiki.views.front_page', name='root'),
    url(r'^view/(?P<arg>.*)/$', 'djambe.wiki.views.view', name='view'),
    (r'^blank_form/$', 'djambe.wiki.views.blank_form'),
    (r'^new_form/(?P<arg>.*)/$', 'djambe.wiki.views.new_form'),
    (r'^edit_form/(?P<num>\d+)/$', 'djambe.wiki.views.edit_form'),
    (r'^save/(?P<num>\d+)/$', 'djambe.wiki.views.save'),
    (r'^ajax_save/(?P<num>\d+)/$', 'djambe.wiki.views.ajax_save'),
    url(r'^list/$', 'djambe.wiki.views.page_list', name='page_list'),
    (r'^delete_confirm/(?P<num>\d+)/$', 'djambe.wiki.views.delete_confirm'),
    (r'^delete/(?P<num>\d+)/$', 'djambe.wiki.views.delete'),
    (r'^version_list/(?P<num>\d+)/$', 'djambe.wiki.views.version_list'),
    (r'^view_version/(?P<num>\d+)/$', 'djambe.wiki.views.view_version'),
    (r'^revert_version/(?P<num>\d+)/$', 'djambe.wiki.views.revert_version'),
    url(r'^tag/(?P<num>\d+)/$', 'djambe.wiki.views.tag', name='tag'),
    (r'^quit_edit/(?P<num>\d+)/$', 'djambe.wiki.views.quit_editing'),
    (r'^history/$', 'djambe.wiki.views.history'),
    (r'^iframe_view/(?P<arg>.*)/(?P<iframe_id>.*)/$', 'djambe.wiki.views.iframe_view'),
    (r'^print_view/(?P<num>\d+)/$', 'djambe.wiki.views.print_view'),
    (r'^search/$', 'djambe.wiki.views.search'),
    (r'^ajax_unlock/(?P<num>\d+)/$', 'djambe.wiki.views.ajax_unlock'),
)
